From: Matthias Clasen Date: Mon, 6 Jun 2016 18:29:27 +0000 (-0400) Subject: Revert "scrolledwindow: Bug 766569 - Report child natural size unconditionally" X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~1622 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=289fc9640bbeba1096f15bb0b735d0361cf4c9dc;p=gtk%2B3.0.git Revert "scrolledwindow: Bug 766569 - Report child natural size unconditionally" This reverts commit 0943c9f6b2c3ad5827ae5d8f3742f75e72782e41. The commit caused unexpected breakage in gtk3-widget-factory, and also broke the just-added max-content-size properties. --- diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 1a5014de2f..1fbf189c75 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -1781,18 +1781,17 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget, &min_child_size, &nat_child_size); - natural_req.width += nat_child_size; - if (priv->hscrollbar_policy == GTK_POLICY_NEVER) { minimum_req.width += min_child_size; + natural_req.width += nat_child_size; } else { if (priv->min_content_width >= 0) { minimum_req.width += priv->min_content_width; - natural_req.width = MAX (priv->min_content_width, natural_req.width); + natural_req.width += priv->min_content_width; extra_width = -1; } @@ -1823,18 +1822,17 @@ gtk_scrolled_window_measure (GtkCssGadget *gadget, &min_child_size, &nat_child_size); - natural_req.height += nat_child_size; - if (priv->vscrollbar_policy == GTK_POLICY_NEVER) { minimum_req.height += min_child_size; + natural_req.height += nat_child_size; } else { if (priv->min_content_height >= 0) { minimum_req.height += priv->min_content_height; - natural_req.height = MAX (priv->min_content_height, natural_req.height); + natural_req.height += priv->min_content_height; extra_height = -1; }